package com.aatattoo.light_food_service.mapper;

import com.aatattoo.light_food_service.entity.DynamicTag;
import com.aatattoo.light_food_service.entity.DynamicTagFollow;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author aatattoo
 * @Date 2022/2/28 11:09 上午
 * @msg:
 */
@Mapper
@Repository
public interface DynamicTagFollowMapper {
    /**
     * 用户关注标签
     * @param dynamicTagFollow 用户关注的标签ID,用户id
     * @return
     */
    int followTag(DynamicTagFollow dynamicTagFollow);

    /**
     * 用户取消关注标签
     * @param dynamicTagFollow
     * @return
     */
    int unFollowTag(DynamicTagFollow dynamicTagFollow);

    /**
     * 获取用户关注的标签列表
     * @param userId
     * @return
     */
    List<Integer> getFollowTagId(@Param("userId")int userId);

    /**
     * 查找用户是否关注了此标签
     * @param dynamicTagFollow
     * @return
     */
    int isTableFollowTag(DynamicTagFollow dynamicTagFollow);

}
